package com.dfc.springmvc.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.dfc.springmvc.common.Criteria;
import com.dfc.springmvc.common.PageInfo;
import com.dfc.springmvc.dao.PhoneRepairPriceDao;
import com.dfc.springmvc.pojo.PhoneRepairPrice;
import com.dfc.springmvc.service.PriceService;

@Service
public class PriceServiceImpl implements PriceService{
	
	Logger log = Logger.getLogger(this.getClass());

	@Autowired
	private PhoneRepairPriceDao phonePriceDao;

	@Override
	public List<PhoneRepairPrice> findPhonePriceList(Criteria criteria) {
		return phonePriceDao.findPhonePriceList(criteria);
	}

	@Override
	public int getTotalCount(Criteria criteria) {
		return phonePriceDao.getTotalCount(criteria);
	}

	@Override
	public int updatePhoneprice(PhoneRepairPrice phonePrice) {
		
		return phonePriceDao.updateByPrimaryKey(phonePrice);
	}

	@Override
	public int savePhonePrice(PhoneRepairPrice phonePrice) {
		
		return phonePriceDao.insertSelective(phonePrice);
	}

	@Override
	public int delPhonePrice(String phonePriceId) {
		return phonePriceDao.deleteByPrimaryKey(phonePriceId);
	}

	@Override
	public PhoneRepairPrice findPhonePrice(Criteria criteria) {
		// TODO Auto-generated method stub
		return phonePriceDao.findPhonePrice(criteria);
	}

	@Override
	public List<PhoneRepairPrice> getDictDetailByDictId(String dictId) {
		
		return phonePriceDao.getDictDetailByDictId(dictId);
	}

	@Override
	public List<PhoneRepairPrice> getPhoneType() {
		
		return phonePriceDao.getPhoneType();
	}

}
